﻿using System.Data.Entity.ModelConfiguration;

namespace InvestmentIntelligence.DbModel.Models.Mapping
{
    public class BookSecurityStateMap : EntityTypeConfiguration<BookSecurityState>
    {
        public BookSecurityStateMap()
        {
            // Primary Key
            HasKey(t => new { t.FundBookId, t.SecurityId });
            
            // Table & Column Mappings
            ToTable("OriginalPositionState", "TradingData");
            Property(t => t.FundBookId).HasColumnName("FundBookId");
            Property(t => t.SecurityId).HasColumnName("SecurityId");
            Property(t => t.StateId).HasColumnName("StateId");
        }
    }
}
